/**
 * 
 */
package edu.gtcfla.km.admin.appmodules.service;

import java.util.Collection;
import java.util.Set;

import org.springframework.data.domain.Page;
import org.vsg.biz.BusinessOperationException;
import org.vsg.biz.account.Role;
import org.vsg.biz.account.User;
import org.vsg.search.api.criterion.PaginationCriteria;

import edu.gtcfla.km.admin.appmodules.vo.SysUserFormVO;
import edu.gtcfla.km.admin.appmodules.vo.SysUserListVO;
import edu.gtcfla.km.admin.appmodules.vo.UserRoleAssignedFormVO;

/**
 * @author Bill vison
 *
 */
public interface UserService<T extends User> {

	
	public Page<SysUserListVO>	pageUsers(PaginationCriteria criteria) throws BusinessOperationException, org.vsg.search.api.page.PaginationException;
	
	
	/**
	 * 
	 * @param user
	 * @throws BusinessOperationException
	 */
	public void addUser(SysUserFormVO user) throws BusinessOperationException;
	
	/**
	 * 
	 * @param user
	 * @throws BusinessOperationException
	 */
	public void updateUser(SysUserFormVO user) throws BusinessOperationException;
	
	/**
	 * 
	 * @param user
	 * @throws BusinessOperationException
	 */
	public void deleteUser(SysUserFormVO user) throws BusinessOperationException;
	
	/**
	 * 
	 * @param user
	 * @throws BusinessOperationException
	 */
	public void markDeleteUser(T user) throws BusinessOperationException;
	
	/**
	 * 
	 * @param pk
	 * @return
	 * @throws BusinessOperationException
	 */
	public SysUserFormVO loadUser(java.io.Serializable pk) throws BusinessOperationException;
	
	
	public UserRoleAssignedFormVO loadRoleAssignedForm( java.io.Serializable pk ) throws BusinessOperationException;
	

	public Collection<Role> findUnassociatedRolesByActor(T user) throws BusinessOperationException;

	
	public Set findAssignedRoles(T user ) throws BusinessOperationException;
	
	/**
	 * all users
	 * @param users
	 * @throws BusinessOperationException
	 */
	public void deleteUsers(String[] userIds) throws BusinessOperationException;
	
	
	public void assignedRoles(String[] roles, T actor) throws BusinessOperationException;
}
